package com.ilink.ilinkapi.dto.ground.dataset;/**
 * <h3>iLink-java-backend-zhangbo2</h3>
 *
 * @Description <p>数据广场元数据请求体</p>
 * @Author ZhangBo
 * @Date 2024-09-15 22:16
 **/

import java.io.Serializable;
import java.util.Objects;
import lombok.Data;

/**
 * @ClassName ProjectMetadataRequest
 * @Description 数据广场元数据请求体
 * @Author ZhangBo
 * @Date 2024-09-15 22:16
 **/
@Data
public class DatasetMetadataRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    private String sortBy = "最热";
    private String keywords = "";
    private String tag = "";
    private int page = 1;
    private int size = 12;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DatasetMetadataRequest that = (DatasetMetadataRequest) o;
        return page == that.page && 
               size == that.size && 
               Objects.equals(sortBy, that.sortBy) && 
               Objects.equals(keywords, that.keywords) && 
               Objects.equals(tag, that.tag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sortBy, keywords, tag, page, size);
    }
}
